<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();//获得当前的项目根目录路径赋值给path
%>
<jsp:include page="/WEB-INF/jsp/common/header.jsp"></jsp:include>

<body>
<!--nav start-->
<jsp:include page="/WEB-INF/jsp/common/nav.jsp"></jsp:include>
<!--inside content start-->
<div class="inside_wrap">
    <div class="inside_con">
        <div class="adr">
            <a href="">首页</a>&nbsp;>&nbsp;校园论坛&nbsp;>&nbsp;发布帖子
        </div>
        <div class="inside_box">
            <%--LEft--%>

            <div class="ic_wrap " style="width: 1050px">
                <form class="layui-form"  action="<%=path%>/tiezi/add" method="post">
                    <%-- <input type="hidden" name="id" value="${record.id}">
                 <input type="hidden" name="id" value="${record.id}">--%>

                    <div class="layui-form-item">
                        <label class="layui-form-label">标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" required   lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">帖子内容：</label>
                        <div class="layui-input-block" style=".content img{width: 30px;height: 30px;min-height: 20px; min-width: 20px}">

                            <textarea name="content" id="content"  placeholder="请输入帖子内容"   class="layui-textarea" id="detail" <%--style="display: none;"--%>>${record.content}</textarea>

                        </div>
                    </div>




                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" type="submit">立即发布</button>

                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>







            </div>
            <div class="clear"></div>
        </div>
    </div>
</div>
<!--footer start-->
<jsp:include page="/WEB-INF/jsp/common/footer.jsp"></jsp:include>
<script src="<%=path%>/static/js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="<%=path%>/static/js/jquery.SuperSlide.2.1.js" type="text/javascript"></script>
<script src="<%=path%>/static/js/common.js"></script>
<script src="${pageContext.request.contextPath}/static/layuiadmin/layui/layui.js"></script>
<script>
    //Demo
    layui.use(['form','upload','jquery','laydate','layedit'], function(){
        var $ = layui.$
            ,upload=layui.upload
            ,form = layui.form
            ,laydate=layui.laydate
            ,layedit=layui.layedit;

        //执行一个laydate实例
        laydate.render({
            elem: '#create_date'//指定元素

        });

        layedit.set({
            uploadImage:{
                url:'${pageContext.request.contextPath}/uploadconimage',//接口url
                type:'post'//默认post
            }
        });
        //建立编辑器
        var index = layedit.build('content',{
            tool:['strong','italic','underline','del','|','left','center','right','link','unlink','image','face','video']
            ,height:400

        });


    });
</script>
</body>
</html>
